# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Content.V21.Model.AccountBusinessIdentity do
  @moduledoc """
  The [business identity attributes](https://support.google.com/merchants/answer/10342414) can be used to self-declare attributes that let customers know more about your business.

  ## Attributes

  *   `blackOwned` (*type:* `GoogleApi.Content.V21.Model.AccountIdentityType.t`, *default:* `nil`) - Specifies whether the business identifies itself as being black-owned. This optional field is only available for merchants with a business country set to "US". This field is not allowed for marketplaces or marketplace sellers.
  *   `includeForPromotions` (*type:* `boolean()`, *default:* `nil`) - Required. By setting this field, your business may be included in promotions for all the selected attributes. If you clear this option, it won't affect your identification with any of the attributes. For this field to be set, the merchant must self identify with at least one of the `AccountIdentityType`. If none are included, the request will be considered invalid.
  *   `latinoOwned` (*type:* `GoogleApi.Content.V21.Model.AccountIdentityType.t`, *default:* `nil`) - Specifies whether the business identifies itself as being latino-owned. This optional field is only available for merchants with a business country set to "US". This field is not allowed for marketplaces or marketplace sellers.
  *   `smallBusiness` (*type:* `GoogleApi.Content.V21.Model.AccountIdentityType.t`, *default:* `nil`) - Specifies whether the business identifies itself as a small business. This optional field is only available for merchants with a business country set to "US". It is also not allowed for marketplaces, but it is allowed to marketplace sellers.
  *   `veteranOwned` (*type:* `GoogleApi.Content.V21.Model.AccountIdentityType.t`, *default:* `nil`) - Specifies whether the business identifies itself as being veteran-owned. This optional field is only available for merchants with a business country set to "US". This field is not allowed for marketplaces or marketplace sellers.
  *   `womenOwned` (*type:* `GoogleApi.Content.V21.Model.AccountIdentityType.t`, *default:* `nil`) - Specifies whether the business identifies itself as being women-owned. This optional field is only available for merchants with a business country set to "US". This field is not allowed for marketplaces or marketplace sellers.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :blackOwned => GoogleApi.Content.V21.Model.AccountIdentityType.t() | nil,
          :includeForPromotions => boolean() | nil,
          :latinoOwned => GoogleApi.Content.V21.Model.AccountIdentityType.t() | nil,
          :smallBusiness => GoogleApi.Content.V21.Model.AccountIdentityType.t() | nil,
          :veteranOwned => GoogleApi.Content.V21.Model.AccountIdentityType.t() | nil,
          :womenOwned => GoogleApi.Content.V21.Model.AccountIdentityType.t() | nil
        }

  field(:blackOwned, as: GoogleApi.Content.V21.Model.AccountIdentityType)
  field(:includeForPromotions)
  field(:latinoOwned, as: GoogleApi.Content.V21.Model.AccountIdentityType)
  field(:smallBusiness, as: GoogleApi.Content.V21.Model.AccountIdentityType)
  field(:veteranOwned, as: GoogleApi.Content.V21.Model.AccountIdentityType)
  field(:womenOwned, as: GoogleApi.Content.V21.Model.AccountIdentityType)
end

defimpl Poison.Decoder, for: GoogleApi.Content.V21.Model.AccountBusinessIdentity do
  def decode(value, options) do
    GoogleApi.Content.V21.Model.AccountBusinessIdentity.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Content.V21.Model.AccountBusinessIdentity do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
